<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<th:block th:include="include :: dist-css" />
<body class="gray-bg">

<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            公司名称：<input type="text" name="companyName"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
            <a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:feedbackMessage:remove">
                <i class="fa fa-remove"></i> 删除
            </a>
            <a class="btn btn-warning" onclick="$.table.exportExcel()"
               shiro:hasPermission="business:feedbackMessage:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<div th:include="include :: footer"></div>
<div th:include="include :: dist-js"></div>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('business:feedbackMessage:edit')}]];
    var removeFlag = [[${@permission.hasPermi('business:feedbackMessage:remove')}]];
    var prefix = ctx + "business/feedbackMessage";

    $(function () {
        var options;
        options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "意见反馈",
            sortName: "create_time",
            sortOrder: "desc",
            search: false,
            showExport: true,
            columns: [{
                checkbox: true
            },
            {
                field: 'feedbackId',
                title: '反馈ID',
                visible: false
            },
            {
                title: "序号",
                formatter: function (value, row, index) {
                    return $.table.serialNumber(index);
                },
                width: '100',
            },
            {
                field: 'companyManage.companyName',
                title: '公司名称',
                width: '200',
            },
            {
                field: 'feedbackContext',
                title: '反馈信息',
                formatter: function (value, row, index) {
                    return $.table.tooltip(value);
                },
                width: '300',
            },
            {
                field: 'feedbackImg',
                title: '反馈图片预览',
                formatter: function (value) {
                    var values = value.split(",");
                    return "<img class='img-rounded' width='100' height='100' src=" + values[0] + "/>";
                },
                width: '300',
            },
            {
                field: 'createBy',
                title: '反馈人'
            },
            {
                field: 'createTime',
                title: '创建时间',
                sortable: true
            },
            {
                title: '操作',
                align: 'center',
                formatter: function(value, row, index) {
                    var actions = [];
                    var titleTab = "详细图片";
                    actions.push('<a class="btn btn-info btn-xs" href="#" onclick="$.operate.editTab(\'' + row.feedbackId + '\',\'' +titleTab+ '\')"><i class="fa fa-cog"></i>详细图片</a> ');
                    return actions.join('');
                }
            }]
        };
        $.table.init(options);
    });

</script>
<script type="text/javascript">
</script>
</body>

</html>